/**
 * 19/02/2014
 * 
 * Supplier
 */
package org.cuatrovientos.erp.model;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * Pojo class. Model of Supplier.
 * @author Javier Tejedor
 */
public class Supplier {
	
	@Size(min=1,message="{supplier.id.error}")
	private int id;
	
	@NotNull(message="{supplier.name.error}")
	private String name;
	
	@NotNull(message="{supplier.address.error}")
	private String address;
	
	@NotNull(message="{supplier.phone.error}")
	private String phone;
	
	@NotNull(message="{supplier.email.error}")
	private String email;
	
	@Size(min=1,message="{supplier.idCity.error}")
	private int idCity;
	
	/**
	 * Constructor
	 */
	public Supplier(){
		
	}

	/**
	 * Constructor
	 * @param id
	 * @param name
	 * @param address
	 * @param phone
	 * @param email
	 * @param idCity
	 */
	public Supplier(int id, String name, String address, String phone,
			String email, int idCity) {
		this.id = id;
		this.name = name;
		this.address = address;
		this.phone = phone;
		this.email = email;
		this.idCity = idCity;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public int getIdCity() {
		return idCity;
	}

	public void setIdCity(int idCity) {
		this.idCity = idCity;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Customer [id=" + id + ", name=" + name + ", address=" + address
				+ ", phone=" + phone + ", email=" + email + ", idCity="
				+ idCity + "]";
	}
	
	
}
